<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="robots" content="noindex, nofollow">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="/styles/general.css" rel="stylesheet" type="text/css" />
<link href="/styles/main.css" rel="stylesheet" type="text/css" />
 <script src="/js/jquery-1.3.2.min.js" type="text/javascript"></script>
<link type="text/css" rel="stylesheet" href="/styles/validator.css"></link>
<script src="/js/formValidator.js" type="text/javascript" charset="UTF-8"></script>
<script src="/js/formValidatorRegex.js" type="text/javascript" charset="UTF-8"></script>
<script type="text/javascript">
$(document).ready(function(){
	$.formValidator.initConfig({formid:"cmxform",onerror:function(msg){alert(msg)}});

	$("#name").formValidator({onshow:"请输入模型名称",onfocus:"请至少要输入2个字符",oncorrect:"OK",defaultvalue:""}).inputValidator({min:2,onerror:"你输入的模型名称长度不正确,请确认"});
	$("#tablename").formValidator({onshow:"请输入数据表名",onfocus:"请至少要输入2个字符",oncorrect:"OK",defaultvalue:""}).inputValidator({min:2,onerror:"你输入的数据表名长度不正确,请确认"});

});
</script>
<title></title>
</head>
<body>
<h1>
<span class="action-span"><a href="/model/">管理模型</a></span>
<span class="action-span1"><a href="/main/">网站管理中心</a> </span><span id="search_id" class="action-span1"> - 添加模型 </span>
<div style="clear:both"></div>
</h1>
<div class="main-div">
  <form class="cmxform" id="cmxform" action="/model/edit/" method="post" name="myform">
  <input name='modelid' id='modelid' type="hidden" value="<!--{$model['modelid']}-->" />
  <table width="100%" id="general-table">      
<tbody id="typeZero" style="display:'block'">
       <tr>
       	<td class="label">
       		* 模型名称：
       	</td>
       	<td>
       		<input name='name' type='text' id='name' size='40' maxlength='50' value="<!--{$model['name']}-->">
       	</td>
       		<td><div id="nameTip" style="width:250px"></div></td>
       </tr>
       <tr>
       	<td class="label">
       		* 数据表名：
       	</td>
       	<td>
       		<input name='tablename' type='text' id='tablename' size='40' maxlength='50' value="<!--{$model['tablename']}-->">
       	</td>
       	<td><div id="tablenameTip" style="width:250px"></div></td>
       </tr>
       <tr>
       	<td class="label">
       		* 模型类型：
       	</td>
       	<td>
       		<select name='modeltype' id='modeltype' >
			<option value='0' <!--{if ($model['modeltype']==0)}--> selected="selected"<!--{/if}-->>直播</option>
			<option value='1' <!--{if ($model['modeltype']==1)}--> selected="selected"<!--{/if}-->>点播</option>
			<option value='2' <!--{if ($model['modeltype']==2)}--> selected="selected"<!--{/if}-->>专题</option>
			<option value='3' <!--{if ($model['modeltype']==3)}--> selected="selected"<!--{/if}-->>文本</option>
		  	</select>
       	</td>
       	<td></td>
       </tr>
       <tr>       
       	<td class="label">
       		模型介绍：
       	</td>
       	<td>
       		<textarea name='description' id='description' style="width:90%;height:50px" ><!--{$model['description']}--></textarea>
       	</td>
       	<td></td>
       </tr>
       <tr>
       	<td class="label">
       		启用全站搜索：
       	</td>
       	<td>
	  		<!--{if ($model['enablesearch']==1)}-->
       		<input type='radio' name='enablesearch' value='1' checked> 是&nbsp;&nbsp;&nbsp;&nbsp;
	  		<input type='radio' name='enablesearch' value='0'> 否
	  	<!--{else}-->
	  		<input type='radio' name='enablesearch' value='1' > 是&nbsp;&nbsp;&nbsp;&nbsp;
	  		<input type='radio' name='enablesearch' value='0' checked> 否
	  	<!--{/if}-->	
       	</td>
       	<td></td>
       </tr>       
</tbody>      
  </table>
  
   <div class="button-div">
        <input type="submit" value="&nbsp;确&nbsp;定&nbsp;" />
        &nbsp;&nbsp;&nbsp;&nbsp;
        <input type="reset" value="&nbsp;重&nbsp;置&nbsp;" />
   </div>
      
  </form>
</div>
{template 'footer.html'}
</body>
</html>
<script language="javascript" type="text/javascript">
$(document).ready(function() {
      $('#cmxform').validate();
    });
</script>